-- GENERATED SPELL FOR [Warleader Krazzilak] --


function spell0_8199(pUnit, Event) --@Backhand,n/a--
pUnit:FullCastSpellOnTarget(18103,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8199', 2348, 1)
end

function spell1_8199(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(6713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8199', 5258, 1)
end

function spell2_8199(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8199', 10313, 1)
end

function spell3_8199(pUnit, Event) --@Infected Wound,n/a--
pUnit:FullCastSpellOnTarget(17230,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8199', 576, 1)
end

function Sorts_8199(pUnit, Event)
local choix_sorts_8199 = math.random(0, 3)
if choix_sorts_8199 == 0 then
pUnit:RegisterEvent('spell0_8199', 1, 1)
end
if choix_sorts_8199 == 1 then
pUnit:RegisterEvent('spell1_8199', 1, 1)
end
if choix_sorts_8199 == 2 then
pUnit:RegisterEvent('spell2_8199', 1, 1)
end
if choix_sorts_8199 == 3 then
pUnit:RegisterEvent('spell3_8199', 1, 1)
end
end

function mob8199_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8199', math.random(1500, 3000), 1)
end

function mob8199_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8199_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8199_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8199, 1, 'mob8199_Action')
RegisterUnitEvent(8199, 2, 'mob8199_Leave')
RegisterUnitEvent(8199, 3, 'mob8199_Kill')
RegisterUnitEvent(8199, 4, 'mob8199_Die')
